<ui:composition xmlns="http://www.w3.org/1999/xhtml"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:p="http://primefaces.org/ui"
     xmlns:o="http://omnifaces.org/ui">
    
    <div class="form-group">
        <label for="accessRadios">
            #{bundle['dataverse.permissions.Q1']}
        </label>
        <div class="col-sm-offset-1">
            <p:selectOneRadio id="authenticatedUsersContributorRoleRadio" value="#{managePermissionsPage.authenticatedUsersContributorRoleAlias}" layout="grid" columns="1">
                <f:selectItem itemLabel="#{bundle['dataverse.permissions.Q1.answer1']}" itemValue="" />
                <f:selectItem itemLabel="#{bundle['dataverse.permissions.Q1.answer2']}" itemValue="dvContributor" />
                <f:selectItem itemLabel="#{bundle['dataverse.permissions.Q1.answer3']}" itemValue="dsContributor" />
                <f:selectItem itemLabel="#{bundle['dataverse.permissions.Q1.answer4']}" itemValue="fullContributor" />                
            </p:selectOneRadio>            
        </div>
    </div>

    <div class="form-group">
        <label for="contributorRadios">
            #{bundle['dataverse.permissions.Q2']}
        </label>
        <div class="col-sm-offset-1">
            <p:selectOneRadio id="defaultContributorRoleRadio" value="#{managePermissionsPage.defaultContributorRoleAlias}" layout="custom" >
                <f:selectItem itemLabel="#{bundle.editor}" itemValue="contributor" /> 
                <f:selectItem itemLabel="#{bundle.curator}" itemValue="curator" /> 
                <f:selectItem itemLabel="#{managePermissionsPage.customDefaultContributorRoleName}" itemValue="#{managePermissionsPage.customDefaultContributorRoleAlias}" /> #{managePermissionsPage.customDefaultContributorRoleAlias}               
            </p:selectOneRadio>
            <div class="radio no-padding-left">
                <label for="opt1">
                    <p:radioButton id="opt1" for="defaultContributorRoleRadio" itemIndex="0" />
                    #{bundle.editor}
                    <span class="text-muted">#{bundle['dataverse.permissions.Q2.answer.editor.description']}</span>
                </label>
            </div>
            <div class="radio no-padding-left">
                <label for="opt2">
                    <p:radioButton id="opt2" for="defaultContributorRoleRadio" itemIndex="1" />
                    #{bundle.curator}
                    <span class="text-muted">#{bundle['dataverse.permissions.Q2.answer.curator.description']}</span>
                </label>
            </div>
            <ui:fragment rendered="#{managePermissionsPage.isCustomDefaultContributorRole()}">
            <div class="radio no-padding-left">
                <label for="opt3">
                    <p:radioButton id="opt3" for="defaultContributorRoleRadio" itemIndex="2"  />
                    #{managePermissionsPage.customDefaultContributorRoleName} 
                    <span class="text-muted">- #{managePermissionsPage.customDefaultContributorRoleDescription}</span>
                </label>
            </div>
            </ui:fragment>
        </div>              
    </div>    
</ui:composition>
